|
2020-2021 Sunseeker Telemetry and Lighting System
|
#include "driverlib.h"Go to the source code of this file.
Functions | |
| void | main (void) |
| void | USCI_B0_ISR (void) |
Variables | |
| uint8_t | transmitData = 0x01 |
| uint8_t | receiveData = 0x00 |
| void main | ( | void | ) |
Definition at line 76 of file eusci_b_spi_ex1_slave.c.
References param.
| void USCI_B0_ISR | ( | void | ) |
Definition at line 120 of file eusci_b_spi_ex1_slave.c.
References receiveData, and transmitData.
| uint8_t receiveData = 0x00 |
Definition at line 74 of file eusci_b_spi_ex1_slave.c.
Referenced by USCI_B0_ISR().
| uint8_t transmitData = 0x01 |
SPI slave talks to SPI master using 3-wire mode. Data is received from master and data from slave is then transmitted back to master. USCI RX ISR is used to handle communication, CPU normally in LPM4. Prior to initial data exchange, master pulses slaves RST for complete reset.
Use with eusci_spi_ex1_master code example. If the slave is in debug mode, the reset signal from the master will conflict with slave's JTAG; to work around, use IAR's "Release JTAG on Go" on slave device. If breakpoints are set in slave RX ISR, master must stopped also to avoid overrunning slave RXBUF.
/|\ | | | | | Master—+->|RST | | | | P2.6|-> Data Out (UCB0SIMO) | | | P2.5|<- Data In (UCB0SOMI) | | | P2.7|-> Serial Clock Out (UCB0CLK)
This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:
This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.
Definition at line 74 of file eusci_b_spi_ex1_slave.c.
Referenced by USCI_B0_ISR().